<template>
	<view>
		
		<uni-card :is-shadow="false" style="height: 130px;" v-for="(item,index) in binglis" :key="index">
			<view style="float: left;width: 200px;height: 130px;">
				<p style="font-size: 18px;color: #555555;margin-top: 10px;">常规病历检查报告</p>
				<p style="font-size: 16px;color: #555555;margin-top: 15px;">{{item.divisionType.divisionName}} {{item.doctor.doctorName}}</p>
				<p style="font-size: 16px;color: #555555;margin-top: 5px;">{{item.diagnosticTime}}</p>
			</view>
			<view style="float: right;width: 90px;height: 130px;">
				<p style="font-size: 20px;color: #006EFF;margin-top: 50px;" @click="Toxiangqing(item)">查看详情</p>
			</view>
		</uni-card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				patient: {},
				binglis: [],
			}
		},
		created() {
			this.patient = uni.getStorageSync('patient')
			console.log(this.patient)
			this.getBinglis()
		},
		methods: {
			getBinglis() {
				this.$axios.get("/other/other/medical-records/getBinglis/" + this.patient.id).then((
						res) => {

						this.binglis = res.data.data.list
						console.log(this.binglis)

					}) //请求成功
					.catch((error) => {
						console.log(error);
					});
			},
			Toxiangqing(item){
				
				uni.setStorage({
					key: 'bingliOne',
					data: item,
					success() {
						console.log('病历详情存储成功')
					}
				})
				
				setTimeout(() => {
					uni.navigateTo({
						url: '../appointment/binglixiangqing'
					})
				})
			}
		}
	}
</script>

<style>

</style>
